<?php

namespace App\Admin\Actions\Post;

use App\Admin\Repositories\HouseBroker;
use Dcat\Admin\Grid;
use Dcat\Admin\Grid\LazyRenderable;

class HouseBrokers extends LazyRenderable
{
    public function grid():Grid
    {
        return Grid::make(new HouseBroker(), function (Grid $grid) {
            $grid->column('id')->sortable();
            $grid->column('broker_name');
            $grid->column('created_at');
            $grid->column('updated_at')->sortable();

            $grid->filter(function (Grid\Filter $filter) {
                $filter->equal('id');

            });
        });
    }

}
